#include <iostream>
#include <list>
using namespace std;

template<typename T>
void print(const T& vec)
{
    cout<<"size:"<<vec.size()<<endl;
    for(auto ite = vec.begin(); ite != vec.end(); ite++)
    {
        cout<<*ite<<" ";
    }
    cout<<endl;
}

int main()
{
    list<int> list1 = {1,3,5,6,7};
    print(list1);

    auto ite = list1.begin();
    for( int i = 0; i < 3; i++)
    {
        ite++;
    }

    cout<<"list插入"<<endl;
    list1.insert(ite, 99);
    print(list1);
    
    cout<<"链表逆序"<<endl;
    list1.reverse();
    print(list1);

    greater<int> list1;

}